<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-list"></i> 秒杀时间设置</h3>
                    </div>
                    <div class="panel-body">
                        <div class="navbar navbar-default">
                            <div class="pull-right" style="margin: 10px">
                                <a href="javascript:history.go(-1)" data-toggle="tooltip" title=""
                                   class="btn btn-default"
                                   data-original-title="返回"><i class="fa fa-reply"></i></a>
                            </div>
                        </div>
                    </div>
                    <form class="navbar-form form-inline" id="handleposition" action="" method="post">
                        <div class="form-group-label col-sm-2 text-right">
                            <label class="col-form-label">开放时间</label>
                        </div>
                        <div class="col-sm-6">
                            <?php for ($i = 0; $i < 24; $i++): ?>
                                <label class="custom-control custom-checkbox" style="margin-right: 10px">
                                    <input name="open_time[]" <?= is_array($open_time) && in_array($i,
                                    $open_time) ? 'checked' : null ?>
                                    value="<?= $i ?>"
                                    type="checkbox" class="custom-control-input">
                                    <span class="custom-control-indicator"></span>
                                    <span class="custom-control-description"><?= $i < 10 ? '0' . $i : $i ?>
                                        :00~<?= $i < 10 ? '0' . $i : $i ?>:59</span>
                                </label>
                            <?php endfor; ?>
                        </div>
                        <div class="form-group row text-center" style="display: block;">
                            <div class="form-group-label col-sm-2 text-right" style="height: 127px">
                            </div>
                            <div class="col-sm-6">
                                <input class="btn btn-primary" type="button"
                                       onclick="adsubmit()" value="保存">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
</div>        <!-- /.row -->
</section>
<!-- /.content -->
</div>
<script>
    function adsubmit() {
        $('#handleposition').submit();
    }
</script>
</body>
</html>